/**
 * 功能描述 导航
 */
define(function (require, exports, module) {
	var Subnav = require("subnav");
    var instance = {
        initComponent: function (params,widget) {
        	var subnav = new Subnav({
        		parentNode:".J-subnav",
        		model:{
        			title:"机构结算",
        			items:[/*{

					      id :"servicePoint",
					      type : "buttongroup",
					      all : {
					    	  show:false,
					    	  first:true
					      },
					      tip : "服务点",
					      keyField :"pkServicePoint",
					      valueField : "name",
					      url : "api/servicepoint/operableservicepoints",
					      params : function(){
					    	  return{
					    		  fetchProperties:"pkServicePoint,name"
					    	  }
					      },
					      handler : function(key,element){
					    	  widget.get("grid").refresh();
					      }
				    
        			},*/{
        				id:"status",
   						tip:"状态",						
   						type:"buttongroup",
   						
   						items:[{
   							key:"Pending",
   							value:"待结算",
   						},{
   							key:"Settled",
   							value:"已结算"
   						}],
   						all: {
   			                show: true,
   			                position: "bottom",
   			                text: "全部", 
   			                key:""
   			            },
   						handler:function(key,element){
   							widget.get("grid").refresh();
   						}
        			},{
        				id: "settlementDate",
						tip:"机构结算时间",
						type:"daterange",
						ranges : {
							"今天": [moment().startOf("days"),moment().endOf("days")],
					        "本月": [moment().startOf("month"), moment().endOf("days")],
					        "本年": [moment().startOf("year"), moment().endOf("year")]
						},
						defaultRange : "本月",
						handler : function(time){
							 widget.get("grid").refresh();
						}
        			}]
        		}
        	});
        	widget.set("subnav",subnav);
        }
    };
    module.exports = instance;
});
